package cn.tedu.tmall.admin.content.startup;

import cn.tedu.tmall.admin.content.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
@Component
public class CategoryRunner implements ApplicationRunner {
    @Autowired
    public ICategoryService service;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("向redis中存入category数据");
        service.rebuildCache();
        System.out.println("存储完毕");
    }
}
